package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.dao.VariableParameterDao;
import com.example.demo.entity.VariableParameter;
import com.example.demo.service.VariableParameterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * (VariableParameter)表服务实现类
 *
 * @author makejava
 * @since 2021-03-05 09:48:54
 */
@Service("variableParameterService")
public class VariableParameterServiceImpl extends ServiceImpl<VariableParameterDao, VariableParameter> implements VariableParameterService {
    @Resource
    VariableParameterService variableParameterService;
    @Override
    public VariableParameter getByName(String name) {
        QueryWrapper<VariableParameter> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("name",name);
        return variableParameterService.getOne(queryWrapper);
    }

    @Override
    public void removeByName(String name) {
        QueryWrapper<VariableParameter> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("name",name);
        variableParameterService.remove(queryWrapper);
    }
}